﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ZDSoft.LMS.Domain;
using ZDSoft.LMS.Service;
using NHibernate.Criterion;

namespace ZDSoft.LMS.Component
{
    public class DictionariesComponent : IDictionariesService
    {
        public void Create(Dictionary entity)
        {
            entity.Create();
        }

        public void Update(Dictionary entity)
        {
            entity.Update();
        }

        public Dictionary Get(int ID)
        {
            return new Dictionary().Get(ID);
        }

        public void Delete(int ID)
        {
            Get(ID).Delete();
        }

        public void Delete(Dictionary entity)
        {
            entity.Delete();
        }

        public IList<Dictionary> GetAll()
        {
            IList<Dictionary> entities = new Dictionary().GetAll();
            return entities;
        }

        public IList<Dictionary> GetAll(IList<NHibernate.Criterion.ICriterion> queryConditions)
        {
            IList<Dictionary> entities = new Dictionary().GetAll(queryConditions);
            return entities;
        }



        public IList<Dictionary> GetPaged(IList<ICriterion> queryConditions, IList<Order> orderList, int pageIndex, int pageSize, out int count)
        {
            IList<Dictionary> entities = new Dictionary().GetPaged(queryConditions, orderList, pageIndex, pageSize, out count);
            return entities;
        }
    }
}
